package com.nacrtstudio.webgiftshop.facade;

import java.util.List;

import org.apache.tapestry5.services.Request;

import com.nacrtstudio.webgiftshop.model.shop.Address;
import com.nacrtstudio.webgiftshop.model.shop.CartItem;
import com.nacrtstudio.webgiftshop.model.shop.Category;
import com.nacrtstudio.webgiftshop.model.shop.Gift;
import com.nacrtstudio.webgiftshop.model.shop.Order;
import com.nacrtstudio.webgiftshop.model.shop.PackedGift;
import com.nacrtstudio.webgiftshop.model.shop.User;
import com.nacrtstudio.webgiftshop.model.website.QandA;
import com.nacrtstudio.webgiftshop.model.website.beans.QandABean;
import com.nacrtstudio.webgiftshop.util.shop.OrderStatus;

public interface Controller {
//	User commands
	public User getUser();
	public void setUser(User user);
	public Request getRequest();
	public void setRequest(Request request);
	public List<User> getAllUsers();
	public User getUserByEmail(String email);
	public User checkUser(String username, String password);
	public User getUserByUsername(String username);
	public boolean login(String username, String password);
	public boolean isLoggedIn();	
	public boolean getLoggedSignal();
	public User getLoggedUser();
	public boolean logout();	
	public boolean login(User principal);
	public String signUpUser(User user, String rePassword);
	public void updateUser(User user);
	public void deleteShoopingCardFromLoggedUser();	
	public void deleteItemFromShoppingCart(CartItem cartItem);
	public Object addGiftToCart(Long id);
	public void addMore(Long id);
//	Categorizing
	public void createCategory(Category category);
	public void createCategory(String categoryName, String description);
	public List<Category> getAllCategories();
	public boolean deleteCategory(Category deleteCategory);
	public void deleteCategory(Long id);
	public Category getCategory(Long id);
	public void updateCategory(Category editCategory);
	public Category getCategoryByName(String category);
//	Gifts
	public void createGift(Gift gift);
	public void createGift(String imgPath, String giftName, String description,String altText, String categoryName, String price, List<String> imgList, boolean specialContent);
	public List<Gift> getAllGifts();
	public List<Gift> getSortedGifts();
	public Gift findGift(Long id);
	public boolean deleteGift(Gift gift);
	public void updateGift(Gift editGift);
	public List<Gift> getAllGiftsFromCategory(Category category);
	public List<Gift> getMostWantedGifts();
//	Packaging
	public Object packGifts();
	public Object packGiftsFromCart();
	public List<PackedGift> getAllPackedGifts();
	public List<Address> getAllAddress();
	public void createPackedGift(PackedGift packedGift);
	public PackedGift findPackedGift(Long id);
//	Ordering
	void createOrder(Order order);
	public List<Order> getAllOrders();
	public Order getOrderStatus(Long orderId);
	public Order findOrder(Long id);
//	Statusing
	public OrderStatus getOrderStatus(Order order);
	public void setOrderStatus(Order order, OrderStatus status);
	public CartItem findCartItem(Long id);
//	QandA
	public void saveQandA(String question, String answer);
	public List<QandA> getQandAList();
}